<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%> 
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<html> 
	<head>
		<title>Add Illness</title>
		<logic:notPresent name="back">
        	<link href="login.css" rel="stylesheet" type="text/css">
        </logic:notPresent>
        <logic:present name="back">
        	<link href="form/login.css" rel="stylesheet" type="text/css">
        </logic:present>
	</head>
	<body>
		<logic:notPresent name="userid" scope="session">
           	<logic:redirect forward="login_error"></logic:redirect>
		</logic:notPresent>
		<logic:present name="ban" scope="session">
			<logic:redirect forward="ban_error"></logic:redirect>
		</logic:present>
		<logic:notPresent name="years" scope="session">
           	<logic:redirect forward="illegal_access"></logic:redirect>
		</logic:notPresent>
    	<div class="container">
			<div class="header">
				<html:img page="/yssz.jpg"/>
			</div>
			<div class="content">
                <h1>Add Illness</h1>
                <p>
                    <html:link action="viewIllness">view current illness information</html:link><br>
                    <html:form action="/addIllness">
                        illness name : <html:text property="group"/><html:errors property="group"/><br/>
                        begin : <html:select property="beginyear">
                            <html:options collection="years" property="number" labelProperty="number"/>
                        </html:select> year <html:errors property="beginyear"/>
                        <html:select property="beginmonth">
                            <html:option value="1">1</html:option>
                            <html:option value="2">2</html:option>
                            <html:option value="3">3</html:option>
                            <html:option value="4">4</html:option>
                            <html:option value="5">5</html:option>
                            <html:option value="6">6</html:option>
                            <html:option value="7">7</html:option>
                            <html:option value="8">8</html:option>
                            <html:option value="9">9</html:option>
                            <html:option value="10">10</html:option>
                            <html:option value="11">11</html:option>
                            <html:option value="12">12</html:option>
                        </html:select> month <html:errors property="beginmonth"/>
                        <html:select property="beginday">
                            <html:option value="1">1</html:option>
                            <html:option value="2">2</html:option>
                            <html:option value="3">3</html:option>
                            <html:option value="4">4</html:option>
                            <html:option value="5">5</html:option>
                            <html:option value="6">6</html:option>
                            <html:option value="7">7</html:option>
                            <html:option value="8">8</html:option>
                            <html:option value="9">9</html:option>
                            <html:option value="10">10</html:option>
                            <html:option value="11">11</html:option>
                            <html:option value="12">12</html:option>
                            <html:option value="13">13</html:option>
                            <html:option value="14">14</html:option>
                            <html:option value="15">15</html:option>
                            <html:option value="16">16</html:option>
                            <html:option value="17">17</html:option>
                            <html:option value="18">18</html:option>
                            <html:option value="19">19</html:option>
                            <html:option value="20">20</html:option>
                            <html:option value="21">21</html:option>
                            <html:option value="22">22</html:option>
                            <html:option value="23">23</html:option>
                            <html:option value="24">24</html:option>
                            <html:option value="25">25</html:option>
                            <html:option value="26">26</html:option>
                            <html:option value="27">27</html:option>
                            <html:option value="28">28</html:option>
                            <html:option value="29">29</html:option>
                            <html:option value="30">30</html:option>
                            <html:option value="31">31</html:option>
                        </html:select> day <html:errors property="beginday"/><br/>
                        end : <html:select property="endyear">
                            <html:options collection="years" property="number" labelProperty="number"/>
                        </html:select> year <html:errors property="endyear"/>
                        <html:select property="endmonth">
                            <html:option value="1">1</html:option>
                            <html:option value="2">2</html:option>
                            <html:option value="3">3</html:option>
                            <html:option value="4">4</html:option>
                            <html:option value="5">5</html:option>
                            <html:option value="6">6</html:option>
                            <html:option value="7">7</html:option>
                            <html:option value="8">8</html:option>
                            <html:option value="9">9</html:option>
                            <html:option value="10">10</html:option>
                            <html:option value="11">11</html:option>
                            <html:option value="12">12</html:option>
                        </html:select> month <html:errors property="endmonth"/>
                        <html:select property="endday">
                            <html:option value="1">1</html:option>
                            <html:option value="2">2</html:option>
                            <html:option value="3">3</html:option>
                            <html:option value="4">4</html:option>
                            <html:option value="5">5</html:option>
                            <html:option value="6">6</html:option>
                            <html:option value="7">7</html:option>
                            <html:option value="8">8</html:option>
                            <html:option value="9">9</html:option>
                            <html:option value="10">10</html:option>
                            <html:option value="11">11</html:option>
                            <html:option value="12">12</html:option>
                            <html:option value="13">13</html:option>
                            <html:option value="14">14</html:option>
                            <html:option value="15">15</html:option>
                            <html:option value="16">16</html:option>
                            <html:option value="17">17</html:option>
                            <html:option value="18">18</html:option>
                            <html:option value="19">19</html:option>
                            <html:option value="20">20</html:option>
                            <html:option value="21">21</html:option>
                            <html:option value="22">22</html:option>
                            <html:option value="23">23</html:option>
                            <html:option value="24">24</html:option>
                            <html:option value="25">25</html:option>
                            <html:option value="26">26</html:option>
                            <html:option value="27">27</html:option>
                            <html:option value="28">28</html:option>
                            <html:option value="29">29</html:option>
                            <html:option value="30">30</html:option>
                            <html:option value="31">31</html:option>
                        </html:select> day <html:errors property="endday"/><br/>
                        treatment : <html:select property="treatment">
                            <html:option value="False">haven't seen doctor</html:option>
                            <html:option value="True">have seen doctor</html:option>
                        </html:select><html:errors property="treatment"/><br/>
                        hospital : <html:text property="hospital"/><html:errors property="hospital"/><br/>
                        doctor : <html:text property="doctor"/><html:errors property="doctor"/><br/>
                        comment(1 for the worst, 5 for the best) : <html:select property="comment">
                            <html:option value="1">1</html:option>
                            <html:option value="2">2</html:option>
                            <html:option value="3">3</html:option>
                            <html:option value="4">4</html:option>
                            <html:option value="5">5</html:option>
                        </html:select><html:errors property="comment"/><br/>
                        <html:submit/><html:cancel/>
                    </html:form>
				</p>
			</div>
			<div class="footer">
				<p>copyright@yssz</p>
			</div>
		</div>   
	</body>
</html>

